<?php
$global = explode('@@', liketry\components\PageTop::widget()); 
if(!empty($top_adv)){
    echo $global[2];
}
?>

<div class="goods-logo">
  <div class="goods-logo-inner">
    <h1><a href="<?=\Yii::$app->urlManager->createUrl(['index'])?>">有试吗</a></h1>
    <div class="goods-logo-ad"><?php echo $global[1]; ?></div>
  </div>
</div>
<div class="goods-nav">
  <div class="goods-nav-in">
    <div class="goods-menu">
      <div class="goods-menu-title">全部分类<span class="icon icon-arrow-down4"></span></div>
      <ul class="goods-menu-list">
<?php foreach(\Yii::$app->params['category_list'] as $category_key => $category_row) { ?>
        <li><a href="<?= \Yii::$app->urlManager->createAbsoluteUrl(['goodslist/lists', 'category' => $category_key]) ?>">
                <span class="icon-nav icon-nav-icon<?= $category_key ?>"></span><i><?= $category_row['name'] ?></i></a></li>
<?php } ?>
      </ul>
    </div>
    <ul class="goods-nav-list">
      <?php if(!$top_ad_show):?>
      <li><a target="_blank" href="<?=\Yii::$app->urlManager->createUrl(['index'])?>">首页</a><i></i></li>
      <?php endif;?>
      <li><a href="<?= \Yii::$app->params['domains']['liketry_url']?>game/">游戏中心</a><i></i></li>
      <li><a href="http://bbs.liketry.com/forum.php">社区</a><i></i></li>
    </ul>
    <div class="goods-search">
      <p class="goods-search-tags">热门搜索：
        <?php echo $global[0]; ?>
      </p>
      <div class="goods-search-box icon icon-search-bg">
        <!--<img src="<?=Yii::getAlias('@static')?>/pc/liketry/images/search-bg.png">-->
        <input type="text" id="searchtext" name="searchtext" value="<?php echo !empty($_GET['goods_name'])?$_GET['goods_name']:'';?>">
        <div class="goods-search-btn" onclick="tosearch()"></div>
      </div>
    </div>
    <div class="goods-nav-bg"></div>
  </div>
</div>
<script type="text/javascript">
function tosearch() {
	var goods_name= $('#searchtext').val();
	window.location.href = "<?php echo Yii::$app->urlManager->createUrl(["goodslist/search",'goods_name'=>'']);?>"+encodeURIComponent(goods_name);
}
</script>